package com.kjs.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
//@ComponentScan用于配置扫描com.kjs.web之外的包下面的类
@ComponentScan(basePackages={"com.kjs.web","com.kjs.common"})
@EnableCaching
public class KjsWebApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(KjsWebApplication.class, args);
	}
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(KjsWebApplication.class);
	}
}